class Util {
  static createElement(tagName, style) {
    let element = document.createElement(tagName);
    for (const o in style) {
      element.style[o] = style[o];
    }
    return element;
  }
  // min到max之间左闭右开的随机整数,
  static getRandomInt(min, max) {
    return Math.floor(Math.random() * (max - min)) + min;
  }
  static randomChoose(data) {
    return data[Util.getRandomInt(0, data.length)];
  }
}
export { Util };
